package com.logos.musicframe.enums;

import lombok.Getter;

/**
 * 喜欢枚举类
 * version 1.0
 * @author rose
 * @since 2025-06-14 11:00:23
 */
@Getter
public enum IsCollectEnum {

    COLLECT(1,true),
    UN_COLLECT(0,false);

    public final int code;

    public final boolean desc;

    IsCollectEnum(int code, boolean desc){
        this.code = code;
        this.desc = desc;
    }

    public static IsCollectEnum getByCode(int codeVal){
        for(IsCollectEnum resultCodeEnum: IsCollectEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }
}